<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ClaraGenomicsAnalysis: common/utils/include/claragenomics/utils/graph.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ClaraGenomicsAnalysis
   &#160;<span id="projectnumber">0.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_85effdddc426fd82e3610be0948fd413.html">utils</a></li><li class="navelem"><a class="el" href="dir_cbd0fd5fcc23422502de88d4fe6e7386.html">include</a></li><li class="navelem"><a class="el" href="dir_8e216217187728c84aa14a4942da12a2.html">claragenomics</a></li><li class="navelem"><a class="el" href="dir_657c9b9511f57ce884717ee8b069b43d.html">utils</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">graph.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">* Copyright (c) 2019, NVIDIA CORPORATION.  All rights reserved.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">*</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">* NVIDIA CORPORATION and its licensors retain all intellectual property</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* and proprietary rights in and to this software, related documentation</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* and any modifications thereto.  Any use, reproduction, disclosure or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">* distribution of this software and related documentation without an express</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* license agreement from NVIDIA CORPORATION is strictly prohibited.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160; </div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;unordered_set&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">namespace </span>claragenomics</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;{</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="structclaragenomics_1_1PairHash.html">   27</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structclaragenomics_1_1PairHash.html">PairHash</a></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> T1, <span class="keyword">class</span> T2&gt;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structclaragenomics_1_1PairHash.html#a46da7ce33ff4cf8a586a0c54b6be1e61">   32</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structclaragenomics_1_1PairHash.html#a46da7ce33ff4cf8a586a0c54b6be1e61">operator()</a>(<span class="keyword">const</span> std::pair&lt;T1, T2&gt;&amp; pair)<span class="keyword"> const</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        <span class="keywordtype">size_t</span> hash_1 = std::hash&lt;T1&gt;()(pair.first);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordtype">size_t</span> hash_2 = std::hash&lt;T2&gt;()(pair.second);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">return</span> hash_1 ^ hash_2;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;};</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html">   41</a></span>&#160;<span class="keyword">class </span><a class="code" href="classclaragenomics_1_1Graph.html">Graph</a></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;{</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">   45</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> = int32_t;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">   47</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">edge_weight_t</a> = int32_t;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">   49</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a> = std::pair&lt;node_id_t, node_id_t&gt;;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#ab52b2707de415931f1990ee338b29eeb">   55</a></span>&#160;    <span class="keyword">const</span> std::vector&lt;node_id_t&gt;&amp; <a class="code" href="classclaragenomics_1_1Graph.html#ab52b2707de415931f1990ee338b29eeb">get_adjacent_nodes</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node)<span class="keyword"> const</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keyword">auto</span> iter = <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>.find(node);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordflow">if</span> (iter != <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>.end())</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <span class="keywordflow">return</span> iter-&gt;second;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="classclaragenomics_1_1Graph.html#ada271fc17a3a6e86f5dcc78c4caa729c">Graph::empty_</a>;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a1b51bca4b58c9922b375c983415ec0c8">   71</a></span>&#160;    <span class="keyword">const</span> std::vector&lt;node_id_t&gt; <a class="code" href="classclaragenomics_1_1Graph.html#a1b51bca4b58c9922b375c983415ec0c8">get_node_ids</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        std::vector&lt;node_id_t&gt; nodes;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter : <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>)</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            nodes.push_back(iter.first);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">return</span> nodes;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#ac96335c01273c0dd74d2628e7bf38794">   85</a></span>&#160;    <span class="keyword">const</span> std::vector&lt;std::pair&lt;edge_t, edge_weight_t&gt;&gt; <a class="code" href="classclaragenomics_1_1Graph.html#ac96335c01273c0dd74d2628e7bf38794">get_edges</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordflow">return</span> {begin(<a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>), end(<a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>)};</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a9861d50dbee863befed15eb8daacff3d">   94</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1Graph.html#a9861d50dbee863befed15eb8daacff3d">set_node_label</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node, <span class="keyword">const</span> std::string&amp; label)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <a class="code" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">node_labels_</a>.insert({node, label});</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="comment">//          no label is associated or node ID doesn&#39;t exist.</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a47bd2f14a355fbbd801846b0af305389">  104</a></span>&#160;    std::string <a class="code" href="classclaragenomics_1_1Graph.html#a47bd2f14a355fbbd801846b0af305389">get_node_label</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node)<span class="keyword"> const</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keyword">auto</span> found_node = <a class="code" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">node_labels_</a>.find(node);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordflow">if</span> (found_node != <a class="code" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">node_labels_</a>.end())</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            <span class="keywordflow">return</span> found_node-&gt;second;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">  122</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">directed_edge_exists</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a> edge)</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>.find(edge) != <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>.end();</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">  130</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">update_adject_nodes</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a> edge)</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keyword">auto</span> find_node = <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>.find(edge.first);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        <span class="keywordflow">if</span> (find_node == <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>.end())</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>.insert({edge.first, {edge.second}});</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        }</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            find_node-&gt;second.push_back(edge.second);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a95ef438f6035c2240bf277645ad27cb9">  146</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1Graph.html#a95ef438f6035c2240bf277645ad27cb9">node_labels_to_dot</a>(std::ostringstream&amp; dot_str)<span class="keyword"> const</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter : <a class="code" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">node_labels_</a>)</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            dot_str &lt;&lt; iter.first &lt;&lt; <span class="stringliteral">&quot; [label=\&quot;&quot;</span> &lt;&lt; iter.second &lt;&lt; <span class="stringliteral">&quot;\&quot;];\n&quot;</span>;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a88dda0ee0cffa26a188a041593d2fcd5">  158</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1Graph.html#a88dda0ee0cffa26a188a041593d2fcd5">edges_to_dot</a>(std::ostringstream&amp; dot_str, <span class="keyword">const</span> std::string&amp; node_separator)<span class="keyword"> const</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> iter : <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>)</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        {</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            <span class="keyword">const</span> <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a>&amp; edge          = iter.first;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            <span class="keyword">const</span> <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">edge_weight_t</a>&amp; weight = iter.second;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            dot_str &lt;&lt; edge.first &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; node_separator &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; edge.second;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            dot_str &lt;&lt; <span class="stringliteral">&quot; [label=\&quot;&quot;</span> &lt;&lt; weight &lt;&lt; <span class="stringliteral">&quot;\&quot;];\n&quot;</span>;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    }</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">  170</a></span>&#160;    std::unordered_map&lt;node_id_t, std::vector&lt;node_id_t&gt;&gt; <a class="code" href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">adjacent_nodes_</a>;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">  173</a></span>&#160;    std::unordered_map&lt;edge_t, edge_weight_t, PairHash&gt; <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">  176</a></span>&#160;    std::unordered_map&lt;node_id_t, std::string&gt; <a class="code" href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">node_labels_</a>;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1Graph.html#ada271fc17a3a6e86f5dcc78c4caa729c">  179</a></span>&#160;    <span class="keyword">const</span> std::vector&lt;node_id_t&gt; <a class="code" href="classclaragenomics_1_1Graph.html#ada271fc17a3a6e86f5dcc78c4caa729c">empty_</a>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;};</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1DirectedGraph.html">  183</a></span>&#160;<span class="keyword">class </span><a class="code" href="classclaragenomics_1_1DirectedGraph.html">DirectedGraph</a> : <span class="keyword">public</span> <a class="code" href="classclaragenomics_1_1Graph.html">Graph</a></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;{</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">Graph::node_id_t</a>;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">Graph::edge_weight_t</a>;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">Graph::edge_t</a>;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1DirectedGraph.html#a85c21aed5db9c7d81cb6003841410371">  198</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1DirectedGraph.html#a85c21aed5db9c7d81cb6003841410371">add_edge</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node_id_from, <a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node_id_to, <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">edge_weight_t</a> weight = 0)</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    {</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <span class="keyword">auto</span> edge = <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a>(node_id_from, node_id_to);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">directed_edge_exists</a>(edge))</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>.insert({edge, weight});</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">update_adject_nodes</a>(edge);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    }</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1DirectedGraph.html#a7844605760f22a2a60e27c23178497b3">  211</a></span>&#160;    std::string <a class="code" href="classclaragenomics_1_1DirectedGraph.html#a7844605760f22a2a60e27c23178497b3">serialize_to_dot</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        std::ostringstream dot_str;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        dot_str &lt;&lt; <span class="stringliteral">&quot;digraph g {\n&quot;</span>;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <span class="comment">// Get nodel labels, if any.</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <a class="code" href="classclaragenomics_1_1Graph.html#a95ef438f6035c2240bf277645ad27cb9">node_labels_to_dot</a>(dot_str);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160; </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="comment">// Get edges.</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <a class="code" href="classclaragenomics_1_1Graph.html#a88dda0ee0cffa26a188a041593d2fcd5">edges_to_dot</a>(dot_str, <span class="stringliteral">&quot;-&gt;&quot;</span>);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        dot_str &lt;&lt; <span class="stringliteral">&quot;}\n&quot;</span>;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keywordflow">return</span> dot_str.str();</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    }</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;};</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1UndirectedGraph.html">  228</a></span>&#160;<span class="keyword">class </span><a class="code" href="classclaragenomics_1_1UndirectedGraph.html">UndirectedGraph</a> : <span class="keyword">public</span> <a class="code" href="classclaragenomics_1_1Graph.html">Graph</a></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;{</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">Graph::node_id_t</a>;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">Graph::edge_weight_t</a>;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keyword">using</span> <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">Graph::edge_t</a>;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1UndirectedGraph.html#a47c5ee6b9616ab24222526f4dcd1fb04">  243</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classclaragenomics_1_1UndirectedGraph.html#a47c5ee6b9616ab24222526f4dcd1fb04">add_edge</a>(<a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node_id_from, <a class="code" href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">node_id_t</a> node_id_to, <a class="code" href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">edge_weight_t</a> weight = 0)</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    {</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <span class="keyword">auto</span> edge          = <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a>(node_id_from, node_id_to);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keyword">auto</span> edge_reversed = <a class="code" href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">edge_t</a>(node_id_to, node_id_from);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">directed_edge_exists</a>(edge) &amp;&amp; !<a class="code" href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">directed_edge_exists</a>(edge_reversed))</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">edges_</a>.insert({edge, weight});</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">update_adject_nodes</a>(edge);</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            <a class="code" href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">update_adject_nodes</a>(edge_reversed);</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        }</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="classclaragenomics_1_1UndirectedGraph.html#a64b119c6ca6049b081ddde7db3c87e3f">  258</a></span>&#160;    std::string <a class="code" href="classclaragenomics_1_1UndirectedGraph.html#a64b119c6ca6049b081ddde7db3c87e3f">serialize_to_dot</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        std::ostringstream dot_str;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        dot_str &lt;&lt; <span class="stringliteral">&quot;graph g {\n&quot;</span>;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        <span class="comment">// Get nodel labels, if any.</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <a class="code" href="classclaragenomics_1_1Graph.html#a95ef438f6035c2240bf277645ad27cb9">node_labels_to_dot</a>(dot_str);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="comment">// Get edges.</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <a class="code" href="classclaragenomics_1_1Graph.html#a88dda0ee0cffa26a188a041593d2fcd5">edges_to_dot</a>(dot_str, <span class="stringliteral">&quot;--&quot;</span>);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        dot_str &lt;&lt; <span class="stringliteral">&quot;}\n&quot;</span>;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="keywordflow">return</span> dot_str.str();</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;};</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160; </div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;} <span class="comment">// namespace claragenomics</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astructclaragenomics_1_1PairHash_html_a46da7ce33ff4cf8a586a0c54b6be1e61"><div class="ttname"><a href="structclaragenomics_1_1PairHash.html#a46da7ce33ff4cf8a586a0c54b6be1e61">claragenomics::PairHash::operator()</a></div><div class="ttdeci">size_t operator()(const std::pair&lt; T1, T2 &gt; &amp;pair) const</div><div class="ttdoc">Operator overload to define hash function.</div><div class="ttdef"><b>Definition:</b> graph.hpp:32</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a88dda0ee0cffa26a188a041593d2fcd5"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a88dda0ee0cffa26a188a041593d2fcd5">claragenomics::Graph::edges_to_dot</a></div><div class="ttdeci">void edges_to_dot(std::ostringstream &amp;dot_str, const std::string &amp;node_separator) const</div><div class="ttdoc">Serialize edges to dot format.</div><div class="ttdef"><b>Definition:</b> graph.hpp:158</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a1b51bca4b58c9922b375c983415ec0c8"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a1b51bca4b58c9922b375c983415ec0c8">claragenomics::Graph::get_node_ids</a></div><div class="ttdeci">const std::vector&lt; node_id_t &gt; get_node_ids() const</div><div class="ttdoc">List all node IDs in the graph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:71</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a8b53264154b5caed266385a007e33404"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a8b53264154b5caed266385a007e33404">claragenomics::Graph::adjacent_nodes_</a></div><div class="ttdeci">std::unordered_map&lt; node_id_t, std::vector&lt; node_id_t &gt; &gt; adjacent_nodes_</div><div class="ttdoc">List of adjacent nodes per node ID.</div><div class="ttdef"><b>Definition:</b> graph.hpp:170</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a4089c636086324cae1f2a2bde56c8b33"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a4089c636086324cae1f2a2bde56c8b33">claragenomics::Graph::edges_</a></div><div class="ttdeci">std::unordered_map&lt; edge_t, edge_weight_t, PairHash &gt; edges_</div><div class="ttdoc">All edges in the graph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:173</div></div>
<div class="ttc" id="aclassclaragenomics_1_1DirectedGraph_html_a7844605760f22a2a60e27c23178497b3"><div class="ttname"><a href="classclaragenomics_1_1DirectedGraph.html#a7844605760f22a2a60e27c23178497b3">claragenomics::DirectedGraph::serialize_to_dot</a></div><div class="ttdeci">std::string serialize_to_dot() const</div><div class="ttdoc">Serialize graph structure to dot format.</div><div class="ttdef"><b>Definition:</b> graph.hpp:211</div></div>
<div class="ttc" id="aclassclaragenomics_1_1UndirectedGraph_html_a47c5ee6b9616ab24222526f4dcd1fb04"><div class="ttname"><a href="classclaragenomics_1_1UndirectedGraph.html#a47c5ee6b9616ab24222526f4dcd1fb04">claragenomics::UndirectedGraph::add_edge</a></div><div class="ttdeci">void add_edge(node_id_t node_id_from, node_id_t node_id_to, edge_weight_t weight=0)</div><div class="ttdoc">Add undirected edges to graph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:243</div></div>
<div class="ttc" id="aclassclaragenomics_1_1DirectedGraph_html_a85c21aed5db9c7d81cb6003841410371"><div class="ttname"><a href="classclaragenomics_1_1DirectedGraph.html#a85c21aed5db9c7d81cb6003841410371">claragenomics::DirectedGraph::add_edge</a></div><div class="ttdeci">void add_edge(node_id_t node_id_from, node_id_t node_id_to, edge_weight_t weight=0)</div><div class="ttdoc">Add directed edges to graph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:198</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a1df5a4be1fc2f71130436e9f718e85ac"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a1df5a4be1fc2f71130436e9f718e85ac">claragenomics::Graph::directed_edge_exists</a></div><div class="ttdeci">bool directed_edge_exists(edge_t edge)</div><div class="ttdoc">Check if a directed edge exists in the grph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:122</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_ada271fc17a3a6e86f5dcc78c4caa729c"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#ada271fc17a3a6e86f5dcc78c4caa729c">claragenomics::Graph::empty_</a></div><div class="ttdeci">const std::vector&lt; node_id_t &gt; empty_</div><div class="ttdoc">An empty list representing no connectivity.</div><div class="ttdef"><b>Definition:</b> graph.hpp:179</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a95ef438f6035c2240bf277645ad27cb9"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a95ef438f6035c2240bf277645ad27cb9">claragenomics::Graph::node_labels_to_dot</a></div><div class="ttdeci">void node_labels_to_dot(std::ostringstream &amp;dot_str) const</div><div class="ttdoc">Serialize node labels to dot format.</div><div class="ttdef"><b>Definition:</b> graph.hpp:146</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a0f9734799fc19b94b0621c956ce5508d"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a0f9734799fc19b94b0621c956ce5508d">claragenomics::Graph::node_id_t</a></div><div class="ttdeci">int32_t node_id_t</div><div class="ttdoc">Typedef for node ID.</div><div class="ttdef"><b>Definition:</b> graph.hpp:45</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_ab52b2707de415931f1990ee338b29eeb"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#ab52b2707de415931f1990ee338b29eeb">claragenomics::Graph::get_adjacent_nodes</a></div><div class="ttdeci">const std::vector&lt; node_id_t &gt; &amp; get_adjacent_nodes(node_id_t node) const</div><div class="ttdoc">Get a list of adjacent nodes to a given node.</div><div class="ttdef"><b>Definition:</b> graph.hpp:55</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a47bd2f14a355fbbd801846b0af305389"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a47bd2f14a355fbbd801846b0af305389">claragenomics::Graph::get_node_label</a></div><div class="ttdeci">std::string get_node_label(node_id_t node) const</div><div class="ttdoc">Get the label associated with a node.</div><div class="ttdef"><b>Definition:</b> graph.hpp:104</div></div>
<div class="ttc" id="aclassclaragenomics_1_1UndirectedGraph_html_a64b119c6ca6049b081ddde7db3c87e3f"><div class="ttname"><a href="classclaragenomics_1_1UndirectedGraph.html#a64b119c6ca6049b081ddde7db3c87e3f">claragenomics::UndirectedGraph::serialize_to_dot</a></div><div class="ttdeci">std::string serialize_to_dot() const</div><div class="ttdoc">Serialize graph structure to dot format.</div><div class="ttdef"><b>Definition:</b> graph.hpp:258</div></div>
<div class="ttc" id="astructclaragenomics_1_1PairHash_html"><div class="ttname"><a href="structclaragenomics_1_1PairHash.html">claragenomics::PairHash</a></div><div class="ttdef"><b>Definition:</b> graph.hpp:27</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a5da2769d7e5bebd1d74c4899e3aad2c5"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a5da2769d7e5bebd1d74c4899e3aad2c5">claragenomics::Graph::node_labels_</a></div><div class="ttdeci">std::unordered_map&lt; node_id_t, std::string &gt; node_labels_</div><div class="ttdoc">Label per node.</div><div class="ttdef"><b>Definition:</b> graph.hpp:176</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a9861d50dbee863befed15eb8daacff3d"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a9861d50dbee863befed15eb8daacff3d">claragenomics::Graph::set_node_label</a></div><div class="ttdeci">void set_node_label(node_id_t node, const std::string &amp;label)</div><div class="ttdoc">Add string labels to a node ID.</div><div class="ttdef"><b>Definition:</b> graph.hpp:94</div></div>
<div class="ttc" id="aclassclaragenomics_1_1DirectedGraph_html"><div class="ttname"><a href="classclaragenomics_1_1DirectedGraph.html">claragenomics::DirectedGraph</a></div><div class="ttdoc">DirectedGraph Object representing a directed graph structure.</div><div class="ttdef"><b>Definition:</b> graph.hpp:183</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html"><div class="ttname"><a href="classclaragenomics_1_1Graph.html">claragenomics::Graph</a></div><div class="ttdoc">Object representing a generic graph structure.</div><div class="ttdef"><b>Definition:</b> graph.hpp:41</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a3892123fce03f805e54ce0076e6b68dc"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a3892123fce03f805e54ce0076e6b68dc">claragenomics::Graph::edge_t</a></div><div class="ttdeci">std::pair&lt; node_id_t, node_id_t &gt; edge_t</div><div class="ttdoc">Typedef for edge.</div><div class="ttdef"><b>Definition:</b> graph.hpp:49</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_ac96335c01273c0dd74d2628e7bf38794"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#ac96335c01273c0dd74d2628e7bf38794">claragenomics::Graph::get_edges</a></div><div class="ttdeci">const std::vector&lt; std::pair&lt; edge_t, edge_weight_t &gt; &gt; get_edges() const</div><div class="ttdoc">Get a list of all edges in the graph.</div><div class="ttdef"><b>Definition:</b> graph.hpp:85</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_a0043ec8f35f7491c06915c887d31ea77"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#a0043ec8f35f7491c06915c887d31ea77">claragenomics::Graph::update_adject_nodes</a></div><div class="ttdeci">void update_adject_nodes(edge_t edge)</div><div class="ttdoc">Update the adjacent nodes based on edge information.</div><div class="ttdef"><b>Definition:</b> graph.hpp:130</div></div>
<div class="ttc" id="aclassclaragenomics_1_1Graph_html_ad5388bf7676b6e35a6e62c034e2993b5"><div class="ttname"><a href="classclaragenomics_1_1Graph.html#ad5388bf7676b6e35a6e62c034e2993b5">claragenomics::Graph::edge_weight_t</a></div><div class="ttdeci">int32_t edge_weight_t</div><div class="ttdoc">Tpyedef for edge weight.</div><div class="ttdef"><b>Definition:</b> graph.hpp:47</div></div>
<div class="ttc" id="aclassclaragenomics_1_1UndirectedGraph_html"><div class="ttname"><a href="classclaragenomics_1_1UndirectedGraph.html">claragenomics::UndirectedGraph</a></div><div class="ttdoc">UndirectedGraph Object representing an undirected graph structure.</div><div class="ttdef"><b>Definition:</b> graph.hpp:228</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
